import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/mes-admin/part/indirect/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  });
};

//胶水物料
export const remove = (ids) => {
  return request({
    url: '/api/mes-admin/part/indirect/remove-glue',
    method: 'post',
    data: ids
  });
};

//胶水条码
export const removePack = (ids) => {
  return request({
    url: '/api/mes-admin/part/indirect/remove-pack',
    method: 'post',
    data: ids
  });
};


export const add = (row) => {
  return request({
    url: '/api/mes-admin/part/indirect/submit-glue',
    method: 'post',
    data: row
  });
};



export const update = (row) => {
  return request({
    url: '/api/mes-admin/part/indirect/submit-glue',
    method: 'post',
    data: row
  });
};

export const importGlueByExcel = (file) => {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    url: '/api/mes-admin/part/indirect/import-glue',
    method: 'post',
    data: file
  });
};

